import { axios } from '@/utils/request'

export function getDoctor (id, department) {
  return axios({
    url: '/doctor/get',
    method: 'get',
    params: {
      'id': id,
      'department': department
    }
  })
}

export function getDoctorByName (name) {
  return axios({
    url: '/doctor/name',
    method: 'get',
    params: {
      'name': name
    }
  })
}
export function getDoctorByDepartment (department) {
  return axios({
    url: '/doctor/department',
    method: 'get',
    params: {
      'department': department
    }
  })
}
export function delDoctor (id) {
  return axios({
    url: '/doctor/del',
    method: 'delete',
    params: {
      'id': id
    }
  })
}

export function saveDoctor (doctor) {
  return axios({
    url: '/doctor/save',
    method: 'post',
    data: doctor
  })
}
export function getByName (name) {
  return axios({
    url: '/doctor/query',
    method: 'get',
    params: {
      'name': name
    }
  })
}
